package com.csii.adhoc.operationLog.serviceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csii.adhoc.annotation.OperationLog;
import com.csii.adhoc.operationLog.OperationLogVo;
import com.csii.adhoc.operationLog.mapper.OperationLogMapper;
import com.csii.adhoc.operationLog.service.OperationLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @description: 操作日志接口实现类
 * @author: panChuanJiang
 * @create: 2021-01-12 14:43
 */
@Service("operationLogService")
@Slf4j
public class OperationLogServiceImpl implements OperationLogService{
    @Resource
    private OperationLogMapper operationLogMapper;

    @Transactional
    @Override
    public void insertOne(OperationLogVo operationLogVo) {
        operationLogMapper.insert(operationLogVo);
    }

    @Override
    public IPage<OperationLog> selectPageLog(Page<OperationLog> page) {
        return operationLogMapper.selectPageLog(page);
    }

}
